
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minium-scale=1.0" />

<title>Paginacion de Usuarios</title>

 <script src="jquery-mobile/jquery-1.6.4.min.js" type="text/javascript"></script>

<script type="text/javascript" language="javascript" src="js/ajax.js"></script>	
<script type="text/javascript" language="javascript" src="js/ajax1.js"></script>	

<script language="JavaScript">
function Borra(ID)
{
var agree=confirm("¿Realmente desea eliminar el registro seleccionado?");
if (agree) { document.location="eliminar1.php?ID="+ID; }
else return false ;
}



function Modificar(ID)
{
var agree=confirm("¿Realmente desea modificar el registro seleccionado?");
if (agree) { document.location="modificar1.php?ID="+ID; }
else return false ;
}


function Visualisar(ID)
{
var agree=confirm("¿Desea visualizar el registro seleccionado?");
if (agree) { document.location="visualizar1.php?ID="+ID; }
else return false ;
}
</script>


<style>
*{
	margin:0;
	padding:0;
	}
body{
	margin:auto;
	background:#FF6600;
}


header{
width:100%;
height:112px;
overflow:hidden;

}
/*menu*/
header nav{
	width:100%;
	max-width:1000px;
	margin: 0.5px auto;
			background:#660000;

max-width:10000px;
	width:100%;
	
	
	
	}
	

header nav ul{
	overflow:hidden;
	list-style:none;
	
	
	
	
	}
header nav ul li{
	float:left;
	width:20%;
	}	
	
header nav ul li a{
	color:#000;
	padding:20px;
	display:block;
	text-decoration:none;
	}	
	
header nav ul li span{
	margin-right:10px;
	
	}
header nav ul li a:hover{
	background:#F00;
	}
	/*end Menu*/
	

	
		/*Sub-Menu*/
header nav >ul >li:hover >ul{
	display:block;
	height:auto;
	
	
	}

header nav >ul >li >ul{
display:block;
	background:#CC0000;
	position:absolute;
	left:0;
	right:0;
	overflow:hidden;
	height:0%;
	-webkit-transition: all .3s ease;
	-moz-transition: all .3s ease;
	-ms-transition: all .3s ease;
	-o-transition: all .3s ease;
	transition:all .3s ease;
	

	
	}
	
	
	/*menu imagen hover*/
	
header nav >ul li a{
	margin:-10px auto;
	display:block;
	line-height:20px;
	padding:25px;
	position:relative;
	text-align:center;
	font-size:100%;
	font-family: 'Black Ops One', cursive;
	text-decoration:none;
	-webkit-transition: all .3s ease;
	-moz-transition: all .3s ease;
	-ms-transition: all .3s ease;
	-o-transition: all .3s ease;
	transition:all .3s ease;
	color:#FFF;
	
}

header nav > ul >li >ul >li a:hover{
	background:#FF0000;
	
	
	}
	
header nav > ul > li a span{
	background:#174459;
	display:block;
	height:100%;
	width:100%;
	left:0;
	position:absolute;
	top:-55px;
	
	-webkit-transition: all .3s ease;
	-moz-transition: all .3s ease;
	-ms-transition: all .3s ease;
	-o-transition: all .3s ease;
	transition:all .3s ease;
	
}

headrr nav	>ul >li > a span .icon{
	display:block;
	line-height:100px;
	
	}
	
header nav >ul >li > a:hover > span{
		top:0;
		
	}
	.home{
		
		width:15%;}
img{
	margin:10px auto;
	

	
	}
	/*colores*/
header nav >ul >li >a >span.primero{
	background:#660000;
}

header nav >ul >li >a >span.segundo{
	background:#660000;
}

header nav >ul >li >a >span.tercero{
	background:#660000;
}

header nav >ul >li >a >span.cuarto{
	background:#660000;
}


header nav >ul >li >a >span.quinto{
	background:#660000;
}
header nav >ul >li >a >span.sexto{
	background:#660000;
}

.brand{
	font-family: 'Black Ops One', cursive;
	font-size:20px;
	line-height:60px;
	float:left;
	color:#000;
	

	
}

	/*end menu imagen hover*/
	
/*Contenedor*/
	section{
		margin:10px auto;
		padding:10px;
		
		}
	section >p{
		text-align:center;
		font-family:"Times New Roman", Times, serif;
		font-size:120%;
		color:#FFF;
	}


/*Contenedor*/


section#contenedor{
	margin:60px auto;
	max-width:1000px;
	text-align:center;
	
}

section#principal, aside, aside1{
	border-radius:0.5em;
	display:inline-block;
	margin:0.25em auto;
	max-width:1000px;
	min-height:200px;
	padding:0.25em;
	text-align:center;
	vertical-align:top;
	width:65%;
	
}


aside{


	border-radius:0.5em;
	display:inline-block;
	margin:0.25em auto;
	max-width:2000px;
	min-height:100px;
	padding:0.25em;
	text-align:center;
	vertical-align:top;
	width:62%;

}

aside1{
	width:30%;
	max-width:100%;
	min-height:100px;
	padding:0.25em;
	text-align:center;
	vertical-align:top;

	}

aside2{
	width:30%;
	max-width:960px;
	min-height:100px;
	padding:0.25em;
	text-align:center;
	vertical-align:top;

	
	}
	
	aside3{
		display:none;
		width:30%;
	max-width:960px;
	min-height:100px;
	padding:0.25em;
	text-align:center;
	vertical-align:top;

	
		
		}
/*end contenedor*/

/*footer*/
footer{

	border-radius:0.5em;
	margin:auto;
	max-width: 960px;
	text-align:center;
}
/*end footer*/


/*slider*/



.slider{
	display:block;
	position:relative;
	margin:-80px auto;
	width:114%;
	max-width:2000px;
	height:1%;
	overflow:hidden;	
	box-shadow:0 0 20px rgba(0,0,0,0.4);
	margin-left:-70px;
	
	

}


.contenedor-img img {
	display: block;
	float: left;
	

}


.cuatro-imagenes {
	width: 100%;
	max-width:2000px;


	
}

.cuatro-imagenes img {
	width: 20%;
	margin:auto;
	box-shadow:0 0 20px rgba(0,0,0,0.4);
	border:4px solid #FF6600;
	margin-left:-10px;

}

.contenedor-img {

position: relative;
	left: 0;
	-webkit-transition: left .10s ease-in;
	-ms-transition: left .10s ease-in;
	-moz-transition: left .10s ease-in;
	-o-transition: left .10s ease-in;
	transition: left .10s ease-in;
}

/*end slider*/



.brand1{
	font-family:sans-serif;
	font-size:12px;
	float:right;
	color:#FFF;
	width:120px;
	text-align:center;

			
	
}

/*modalmask*/

.modalmask {
	position: fixed;
	font-family: Arial, sans-serif;
	top: 0;
	right: 0;
	bottom: 0px;
	left: 0;
	background:#FF6600;
	background-repeat:no-repeat;
	background-size:1000%;	

	z-index: 99999;
	opacity:0;
	-webkit-transition: opacity 400ms ease-in;
	-moz-transition: opacity 400ms ease-in;
	transition: opacity 400ms ease-in;
	pointer-events: none;
}
.modalmask:target {
	opacity:1;
	pointer-events: auto;
}
.modalbox{
	width: 500px;
	position: relative;
	padding: 5px 20px 13px 20px;
	background: #FF6600;
	border-radius:3px;
	-webkit-transition: all 500ms ease-in;
	-moz-transition: all 500ms ease-in;
	transition: all 500ms ease-in;
	border:0.5px solid #FF6600;
	box-shadow:0 0 20px rgba(0,0,0,0.4);
	
	
}

.movedown {
	margin: 0 auto;
}
.rotate {
	margin: 10% auto;
	-webkit-transform: scale(-5,-5); 
	transform: scale(-5,-5);
}
.resize {
	margin: 10% auto;
	width:0;
	height:0;

}
.modalmask:target .movedown{		
margin:5px;
		width:1150px;
	height:auto;

}
.modalmask:target .rotate{		
	transform: rotate(360deg) scale(1,1);
    -webkit-transform: rotate(360deg) scale(1,1);
	width:400px;
	height:auto;
	margin:50px auto;
}

.modalmask:target .resize{
	width:400px;
	height:auto;

}



.close {
	background: #606061;
	color: #FFFFFF;
	line-height: 25px;
	position: absolute;
	right: 1px;
	text-align: center;
	top: 1px;
	width: 24px;
	text-decoration: none;
	font-weight: bold;
	border-radius:3px;
	font-size:16px;
}

.close:hover { 
	background: #FAAC58; 
	color:#222;
}

.ul{
	width:500px;
	margin:20% auto;
	list-style:none;
	
}
.ul li{

	float:left;
	margin-right:35px;

}
.ul li a{
	font-family: Arial, sans-serif;
	font-size:16px;
	text-decoration:none;
	
	padding:20px;
	font-weight:bold;
	border-radius:3px;
	-webkit-transition: all 200ms ease-in;
	-moz-transition: all 200ms ease-in;
	transition: all 200ms ease-in;

}
.ul li a:hover{
	
	color:#222;

}

a{
	text-decoration:
	none;
	font-family: 'Black Ops One', cursive;
	font-size:14px;
	color:#FFF;



}
a:hover{
	color:#000;

}
.nsc{
	position:absolute;
	bottom:40%;
	right:0;
} 



p{
	color:#000;
    font-size:100%;
}
	
/*end modalmask*/

.lupa:hover{
background:#FFF;


}



.user:hover{
background:#FFF;


}
</style>
</head>


<body  bgcolor="#FF4500">
<img src="img/123.png" class="brand" width="100px" height="60"/>
<div id="brand">Servicio Web</div>


<div class="brand1">
<?php

ob_start();

session_start();
// si no han iniciado sesión tratando de acceder a esta página el usuario será redirigido a la index.php
if( (!isset($_SESSION["USUARIO"])))
 {
	 echo "NO SE ENCONTRO EL USUARIO";
     exit;
 }
  
  else
  {
  
?>

<h1 style="color:#FFF;font-size:12px; font-family:'Black Ops One',cursive;">BIENVENIDO:<input type="text" readonly style="width:80px" value="<?php echo $_SESSION["USUARIO"] ?>" /> </h1><br />
   
 
<a href="logout.php" style="color:#FFF; font-size:12px; font-family: 'Black Ops One', cursive;list-style:none; border:1px solid #000; 	border-radius:5px; text-decoration:none; background:#660000;">Cerrar Sesion</a>     
</div>

<header>
<nav>
<ul>
<li><a href="usuarios.php"><span class="segundo"><img src="img/home.png" class="home"/></span>USUARIOS</a></li>
<li><a href="niveles.php"><span class="tercero"><img src="img/promociones.png" width="50%"/></span>NIVELES</a></li>
<li><a href="areas.php"><span class="cuarto"><img src="img/ubicación.png" width="50%"/></span>AREAS</a></li>
<li><a href="datos.php"><span class="quinto"><img src="img/galería.png" width="50%"/></span>DATOS GENERALES</a></li>
</ul>
</nav>
</header>

<section id="contenedor">


<div class="slider">
	<div id="ofertas2">

</div>

<br /><br /><br /><br />

<aside>
    <div class="contenedor-img cuatro-imagenes"  id="slideshow">
   
    </div>

<center><h1>Registros</h1></center>
<?php 
$objConnect = oci_connect('antonhy', 'bahamuth', 'localhost/XE');
$sql = "SELECT REGISTROS.ID, REGISTROS.NOMBRE, REGISTROS.EMAILUSUARIO, REGISTROS.DIRECCION, REGISTROS.EDAD, REGISTROS.SEXO, REGISTROS.RFC, REGISTROS.ESTADO_CIVIL, ESTADOS.ESTADO, CIUDADES.CIUDAD, COLONIAS.COLONIA, COLONIAS.CO_POSTAL FROM ESTADOS INNER JOIN REGISTROS ON ESTADOS.IDESTADO=REGISTROS.IDESTADO INNER JOIN CIUDADES ON REGISTROS.IDCIUDAD=CIUDADES.IDCIUDAD INNER JOIN COLONIAS ON COLONIAS.IDCOLONIA=REGISTROS.IDCOLONIA";
$objParse = oci_parse ($objConnect, $sql);
oci_execute ($objParse,OCI_DEFAULT);
 
$Num_Rows = oci_fetch_all($objParse, $Result);
 
$Per_Page = 5;   // Per Page
 
$Page = $_GET["Page"];
if(!$_GET["Page"])
{
$Page=1;
}
 
$Prev_Page = $Page-1;
$Next_Page = $Page+1;
 
$Page_Start = (($Per_Page*$Page)-$Per_Page);
if($Num_Rows<=$Per_Page)
{
$Num_Pages =1;
}
else if(($Num_Rows % $Per_Page)==0)
{
$Num_Pages =($Num_Rows/$Per_Page) ;
}
else
{
$Num_Pages =($Num_Rows/$Per_Page)+1;
$Num_Pages = (int)$Num_Pages;
}
$Page_End = $Per_Page * $Page;
if ($Page_End > $Num_Rows)
{
$Page_End = $Num_Rows;
}
 
echo "<table width=\"600\" style=\"margin-left:70px\" border=\"1\">\n"; 
echo "<tr>\n"; 
echo "<th width=\"91\"> <div align=\"center\">ID</div></th>\n"; 
echo "<th width=\"91\"> <div align=\"center\">NOMBRE</div></th>\n";
echo "<th width=\"91\"> <div align=\"center\">DIRECCION</div></th>\n"; 
echo "<th width=\"91\"> <div align=\"center\">EDAD</div></th>\n"; 
echo "<th width=\"91\"> <div align=\"center\">SEXO</div></th>\n"; 
echo "<th width=\"91\"> <div align=\"center\">RFC</div></th>\n"; 
echo "<th width=\"91\"> <div align=\"center\">ESTADO</div></th>\n";
echo "<th width=\"91\"> <div align=\"center\">CIUDAD</div></th>\n";
echo "<th width=\"91\"> <div align=\"center\">COLONIA</div></th>\n";
echo "<th width=\"91\"> <div align=\"center\">CODIGO POSTAL</div></th>\n";
echo "</tr>\n"; 
for($i=$Page_Start;$i<$Page_End;$i++)
{
echo "<tr>\n"; 
echo "<td><div align=\"center\">\n"; 
echo $Result["ID"][$i];
echo "</div></td>\n"; 
echo "<td>\n"; 
echo $Result["NOMBRE"][$i];
echo "</td>\n"; 
echo "<td>\n"; 
echo $Result["DIRECCION"][$i];
echo "</td>\n"; 
echo "<td>\n"; 
echo $Result["EDAD"][$i];
echo "</td>\n"; 
echo "<td>\n"; 
echo $Result["SEXO"][$i];
echo "</td>\n"; 
echo "<td>\n"; 
echo $Result["RFC"][$i];
echo "</td>\n"; 
echo "<td>\n"; 
echo $Result["ESTADO"][$i];
echo "</td>\n";
echo "<td>\n"; 
echo $Result["CIUDAD"][$i];
echo "</td>\n";
echo "<td>\n"; 
echo $Result["COLONIA"][$i];
echo "</td>\n";
 echo "<td>\n"; 
echo $Result["CO_POSTAL"][$i];
echo "</td>\n";
echo "</tr>\n";

}
echo "</table>\n"; 
echo "<br>\n"; 
if($Prev_Page)
{
echo " <a href='$_SERVER[SCRIPT_NAME]?Pag=$Prev_Page'>< Anterior</a> ";
}
 
for($i=1; $i<=$Num_Pages; $i++){
if($i != $Page)
{
echo "[ <a href='$_SERVER[SCRIPT_NAME]?Page=$i'>$i</a> ]";
}
else
{
echo "<b> $i </b>";
}
}
if($Page!=$Num_Pages)
{
echo " <a href ='$_SERVER[SCRIPT_NAME]?Page=$Next_Page'>Siguiente></a> ";
}
oci_close($objConnect);

?> 



  <section id="principal">


</aside>

<aside1>



</section>   



</body>
</html>
<?php
  } //cerrar else
?>  
